package com.sc.nft.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.enums.ConSignStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class SecondConSignEquityPropsVO {


    @ApiModelProperty(name = "id")
    private Long id;

    @ApiModelProperty(name = "道具卡名称")
    private String firstTitle;

    @ApiModelProperty(name = "寄售价格")
    private String salesPrice;

    @ApiModelProperty(name = "寄售状态 ON_SALES:寄售中 SUCCESS:已成交 CANCEL:取消 LOCK:挂单锁定")
    private ConSignStatus status;

    @ApiModelProperty(name = "用户手机号")
    private String userTel;

    @ApiModelProperty(name = "寄售时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;


    public void setSalesPrice(BigDecimal salesPrice) {
        this.salesPrice = salesPrice.setScale(2, BigDecimal.ROUND_DOWN).toPlainString();
    }
}
